Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cipher: allow getting the proto of a ciphersuite #461

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

cpu
Copy link
Member

@cpu cpu commented Sep 10, 2024

This commit adds a rustls_supported_ciphersuite_protocol_version() fn for getting the IANA registered protocol version identifier supported by a given rustls_supported_ciphersuite. This avoids downstream users having to use rustls_supported_ciphersuite_get_name() and then matching on the protocol version prefix in that identifier (e.g. curl/curl#14840). This is equivalent to the upstream SupportedCipherSuite.version() fn, but tailored to FFI users.

src/cipher.rs Show resolved Hide resolved
src/cipher.rs Show resolved Hide resolved
src/cipher.rs Outdated Show resolved Hide resolved
src/cipher.rs Outdated Show resolved Hide resolved
This commit adds a `rustls_supported_ciphersuite_protocol_version()` fn
for getting the `rustls_tls_version` IANA registered protocol version
identifier supported by a given `rustls_supported_ciphersuite`. This
avoids downstream users having to use
`rustls_supported_ciphersuite_get_name()` and then matching on the
protocol version prefix in that identifier.
@cpu
Copy link
Member Author

cpu commented Sep 10, 2024

Feels small enough to land without additional reviews. Happy to revisit if there's further feedback.

@cpu cpu merged commit 7d5ecaf into rustls:main Sep 10, 2024
38 checks passed
@cpu cpu deleted the cpu-cipher-proto-version branch September 10, 2024 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants